home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Clock / Include / ClockFra.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.1 KB  |  80 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                ClockFra.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                Lonnie Millett
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef CLOCKFRA_H
  14. #define CLOCKFRA_H
  15.  
  16. // ----- Framework Includes -----
  17.  
  18. #ifndef FWFRAME_H
  19. #include <FWFrame.h>
  20. #endif
  21.  
  22. // ----- Graphic Includes -----
  23.  
  24. #ifndef FWRECT_H
  25. #include <FWRect.h>
  26. #endif
  27.  
  28. //==============================================================================
  29. // Classes defined in this interface
  30. //==============================================================================
  31.  
  32. class CClockFrame;
  33.  
  34. //==============================================================================
  35. // Classes used by this interface
  36. //==============================================================================
  37.  
  38. class CClockPart;
  39. class FW_CFacet;
  40. class XMPFrame;
  41. class XMPShape;
  42. class XMPMacMenuBar;
  43.  
  44. //==============================================================================
  45. // CClockFrame
  46. //==============================================================================
  47.  
  48. class CClockFrame : public FW_CFrame
  49. {
  50. public:
  51.     CClockFrame();
  52.     void InitClockFrame(XMPFrame* xmpFrame, CClockPart* clockPart);
  53.     virtual ~ CDECL CClockFrame();
  54.     
  55.     CClockPart*         GetClockPart();
  56.     
  57.     FW_CFacet*             NewFacet(XMPFacet* xmpFacet);
  58.     virtual void         FacetAdded(FW_CFacet* facet);
  59.     virtual void         FacetRemoved(FW_CFacet* facet);
  60.     
  61.     virtual void         FrameShapeChanged();
  62.     
  63.     virtual void         UpdateClock(unsigned long tickCount);
  64.     virtual XMPShape*     GetNewFrameShape(FW_CFacet* facet);
  65.     
  66. private:
  67.     CClockPart*         fClockPart;
  68.     FW_CRect             fDigitalClockRect;
  69. };
  70.  
  71. //----------------------------------------------------------------------------------------
  72. // CClockFrame::GetClockPart
  73. //----------------------------------------------------------------------------------------
  74. inline CClockPart* CClockFrame::GetClockPart()
  75. {
  76.     return fClockPart;
  77. }
  78.  
  79. #endif
  80.